Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow OAuth 2.0 user defined file sources (w/Dropbox integration) #18272

Merged
merged 11 commits into from
Oct 15, 2024

Conversation

jmchilton
Copy link
Member

Builds on #18222 (only the last commit is relevant to this PR beyond that one currently).

This implements oauth2 client capabilities with the user defined file sources framework. There would be some work to integrate this with user defined object stores also but that would be pretty minimal given the code overlap/shared abstractions used on the client and server.

This works currently more or less but I want to make sure it works with Scope requesting clients and on a second service so I going to wait until I've integrated a Google Drive plugin and documented that before taking it out of Draft/WIP.

This work integrates an initial oauth2 enabled plugin for Dropbox including admin documentation for how to configure it and how build and configure a Dropbox app within Dropbox for a Galaxy instance.


Documentation Screenshot

Screenshot 2024-05-30 at 12 48 35 PM

Documentation Screenshot
Screenshot 2024-05-30 at 12 48 56 PM


Documentation Screenshot

Screenshot 2024-05-30 at 12 49 08 PM

For oauth2 services - the plugin status framework has been updated to reflect some additional information. Hopefully we can use it down the road to know when refresh tokens need to be re-requested and such though nothing beyond initial creation and typical use is implemented here so far:

Screenshot 2024-05-30 at 12 53 18 PM

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • Instructions for manual testing are as follows:
    1. Follow the instructions in the admin docs to create a service and try it out. The docs say the oauth2 callback URI needs to be https but it doesn't need to be if the hostname is localhost. I use http://localhost:8081/oauth2_callback in my local testing with the make client-dev-server proxy.

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@jmchilton jmchilton force-pushed the oauth2_user_file_sources_dev branch from 2ba6a75 to d8339fe Compare May 31, 2024 13:04
@jmchilton jmchilton force-pushed the oauth2_user_file_sources_dev branch 6 times, most recently from 7ddf7db to b02e537 Compare June 12, 2024 14:42
@jmchilton jmchilton force-pushed the oauth2_user_file_sources_dev branch 3 times, most recently from bdb037e to 8a93354 Compare June 19, 2024 15:16
@jmchilton jmchilton force-pushed the oauth2_user_file_sources_dev branch from 8a93354 to 8df6893 Compare July 9, 2024 14:35
@nuwang
Copy link
Member

nuwang commented Jul 9, 2024

This is very cool! Let me know when it's ready and I'd be happy to do some testing.

@jmchilton jmchilton force-pushed the oauth2_user_file_sources_dev branch 2 times, most recently from b15652c to 62137df Compare July 9, 2024 15:51
@jmchilton jmchilton force-pushed the oauth2_user_file_sources_dev branch 10 times, most recently from b2033a4 to cbbd223 Compare September 27, 2024 19:41
@jmchilton jmchilton marked this pull request as ready for review September 30, 2024 13:27
@github-actions github-actions bot added this to the 24.2 milestone Sep 30, 2024
@davelopez davelopez requested a review from itisAliRH October 7, 2024 12:21
@itisAliRH itisAliRH requested a review from davelopez October 7, 2024 12:21
Copy link
Member

@itisAliRH itisAliRH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jmchilton, this looks great. I appreciate it!
I tested it, and it’s running perfectly. I made a few minor tweaks and will build on this to enhance the UI in future PRs.

@mvdbeek mvdbeek force-pushed the oauth2_user_file_sources_dev branch from af3072d to 1e6704a Compare October 11, 2024 11:10
@davelopez davelopez force-pushed the oauth2_user_file_sources_dev branch from 1e6704a to 2d735af Compare October 14, 2024 07:48
@davelopez davelopez marked this pull request as draft October 14, 2024 12:05
jmchilton and others added 10 commits October 14, 2024 14:27
- UI for detailed display of errors.
- UI option to test configuration from management menu.
- API + UI for checking configuration before upgrading to new version of template.
- API + UI for checking configuration before updating current template's settings.
- Add an option during update/upgrade to allow forcing the update even if configuration doesn't validate - I don't allow creation of invalid things, but if there are problems with an existing thing - admins and power users should have recourse. It is their data.
…ile redirecting to the file source provider in `FileSources/CreateInstance`
… and show errors in `CreateUserFileSource`

Co-authored-by: David López <[email protected]>
@davelopez davelopez force-pushed the oauth2_user_file_sources_dev branch from 2d735af to c905259 Compare October 14, 2024 13:18
@davelopez
Copy link
Contributor

Looks like the integration tests failures are relevant, I'll take a look.

@davelopez davelopez marked this pull request as ready for review October 15, 2024 09:34
Copy link
Contributor

@davelopez davelopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remaining test failures are unrelated.

Thank you @jmchilton and @itisAliRH!

@itisAliRH itisAliRH merged commit 0dbc039 into galaxyproject:dev Oct 15, 2024
56 of 58 checks passed
@jmchilton
Copy link
Member Author

Wow - this is huge - thank you for the merge!

@jdavcs jdavcs added the highlight Included in user-facing release notes at the top label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/API area/auth Authentication and authorization area/UI-UX highlight Included in user-facing release notes at the top kind/feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants